<script type="text/javascript" src="./tpl/js/share_list.js"></script>
<script type="text/javascript" src="./tpl/js/share_list2.js"></script>
<!--{if empty($share_list)}-->
<div class="empty" id="SHARE_DETAIL_LiST_EMPTY">
	<img alt="" class="fl" src="./tpl/images/fanwe4.png">
	<!--{if $home_uid == $_FANWE['uid']}-->
	<span>你还没有发过消息呢~</span>
	<br>在上边的输入框里写一句想说的话，把生活分享给大家吧。
	<!--{else}-->
	<span>呼~~这里还是空的~~</span>
	<!--{/if}-->
</div> 
<ul class="t_l" id="SHARE_DETAIL_LiST">
</ul>
<!--{else}-->
<ul class="t_l" id="SHARE_DETAIL_LiST">
	<!--{loop $share_list $share_item}-->
	<?php
		$relay_share = array();
		$parent_share = array();
		$self_share = $share_item;
		if($share_item['base_id'] > 0)
		{
			$relay_share = $share_item['relay_share'];
			if($share_item['parent_id'] > 0 && $share_item['parent_id'] != $share_item['base_id'])
				$parent_share = $share_item['parent_share'];
			else
				$parent_share = $relay_share;
		}
	?>
	<li class="t_f" id="SHARE_LIST_{$share_item['share_id']}">
		<!--{if $share_item['type'] == 'fav' && $parent_share}--> 
		<div class="t_tag"> <span class="t">{$share_item['time']}</span> </div>
		
		<!--{else}-->
		<div class="t_tag"> <span class="t" >{$share_item['time']}</span> </div>
		<!--{/if}--> 
		<div class="hd">
			<!--{getuser $share_item['uid'] 0 'm,48' ',avt icard r5 lazyload'}-->
			<div class="addfo">
				<!--{getfollow $share_item['uid'] inc/getfollow/share_list}-->
			</div>
		</div>
		<div class="tk">
			<div class="inf">
				<!--{getuser $share_item['uid'] 1 '' 'icard n gc'}-->
                <?php
                    $medals = FS('User')->getUserMedal($share_item['uid']);
                ?>
                <!--{loop $medals $medal}-->
                <a href="{u medal/u uid=$home_uid}" class="v" target="_blank"><img src="{$medal['small_img']}" height="25" alt="{$medal['name']}" title="{$medal['name']}"></a>
                <!--{/loop}-->
				<span>
					<?php $share_detail = &$share_item; ?>
					<!--{subtemplate inc/share/rel_type}-->
					<!--{if $share_item['is_rec_best'] == 1}-->
					<img style="vertical-align:-3px; _vertical-align:-2px;" src="./tpl/images/topic_tj.png" />
					<!--{/if}-->
				</span>
                &nbsp;&nbsp;他的<a href="/article.php?action=index&uid={$share_item['uid']}&anli=1">案例</a>和<a href="/article.php?action=index&uid={$share_item['uid']}">经验</a>
			</div>
			<p class="sms">{$share_item['content']}</p>
			<!--{if !empty($share_item['tags']['user']) || $share_item['is_eidt_tag']}-->
			<?php
				$is_eidt_tag = $share_item['is_eidt_tag'];
				$share_tags_share_id = $share_item['share_id'];
				$share_tags = $share_item['tags']['user'];
			?>
			<!--{subtemplate inc/share/tags}-->
			<!--{/if}-->
			<!--{if !empty($share_item['imgs'])}-->
			<div id="pic_{$share_item['share_id']}" class="pic">
				<!--{loop $share_item['imgs'] $share_item_img}-->
				<div class="r3 fl" onclick="showbigimg(this, {$share_item['share_id']})">
				    <img alt="{$share_item_img['alt']}" src="{getimg $share_item_img['img'] 100 100}" class="fl" width="100" height="100">
				</div>
				<!--{/loop}-->
			</div>
			<div id="picb_{$share_item['share_id']}" class="share_pic_box" style="display:none;">
    			<ul class="pic_b">
    			    <?php $index=0; $count = count($share_item['imgs']); ?>
    				<!--{loop $share_item['imgs'] $share_item_img}-->
    				<li style="display: list-item; display:none;">
    					<div class="pic_b_bd">
    						<div class="pic_pn">
                                <a href="javascript:;"{if $index > 0} onclick="showbigimg2(<?php echo $index-1; ?>, {$share_item['share_id']})"{else} onclick="hidebigimg({$share_item['share_id']})"{/if} class="swp-btn swp-perv" style="display:none;" title="上一张" hidefocus=""><i></i></a>
                                <a href="javascript:;"{if $index < $count-1} onclick="showbigimg2(<?php echo $index+1; ?>, {$share_item['share_id']})"{else} onclick="hidebigimg({$share_item['share_id']})"{/if} class="swp-btn swp-next" style="display:none;" title="下一张" hidefocus=""><i></i></a>
                                <img class="lazyload1" original="{getimg $share_item_img['img'] 468 468}" src="./tpl/images/lazyload.gif" scaleType="1" scaleWidth="468" scaleHeight="468" alt="{$share_item_img['alt']}">
                            </div>
    					</div>
    				</li>
    				<?php $index++; ?>
    				<!--{/loop}-->
    			</ul>
    			<!--{if count($share_item['imgs']) > 1}-->
        		<div class="share_pic_scroll">
        			<a id="left_{$share_item['share_id']}" class="ui i_left" href="javascript:void(0);"></a>
        			<ul id="picscroll_{$share_item['share_id']}">
        			    <?php $index=0; ?>
        				<!--{loop $share_item['imgs'] $share_item_img}-->
        				<li>
        				    <a href="javascript:void(0);" onclick="showbigimg2({$index}, {$share_item['share_id']})"><img alt="{$share_item_img['alt']}" src="{getimg $share_item_img['img'] 64 64}"></a>
        				</li>
        				<?php $index++; ?>
        				<!--{/loop}-->
        			</ul>
        			<a id="right_{$share_item['share_id']}" class="ui i_right" href="javascript:void(0);"></a>
        			<div class="clearit"></div>
        		</div>
        		<!--{/if}-->
			</div>
			<!--{/if}-->
			<!--{if !empty($relay_share) && $relay_share['share_id'] != $share_item['share_id']}-->
			<div class="q r5">
				<img src="./tpl/images/quote_arrow.png" class="q_a">
				<p class="sms">
					@<!--{getuser $relay_share['uid'] 0 '' 'icard n'}-->：{cutstr $relay_share['content'] 200} <a href="{$relay_share['url']}" target="_blank">原文转发({$relay_share['relay_count']})</a>  <a href="{$relay_share['url']}" target="_blank">原文评论({$relay_share['comment_count']})</a>
				</p>
				<!--{if !empty($relay_share['imgs'])}-->
				<div class="pic" style="display: block;">
					<!--{loop $relay_share['imgs'] $relay_share_img}-->
					<div class="r3">
					    <img alt="{$share_item_img['alt']}" src="{getimg $relay_share_img['img'] 100 100}" class="fl" width="100" height="100">
						<!--<img alt="{$relay_share_img['alt']}" class="fl lazyload" original="{getimg $relay_share_img['img'] 100 100}" src="./tpl/images/lazyload.gif" scaleType="3" scaleWidth="100" scaleHeight="100" />-->
						<!--{if $relay_share_img['type'] == 'g'}-->
						<img class="tag" src="./tpl/images/goods_tag.png" />
						<!--{/if}-->
					</div>
					<!--{/loop}-->
					<br class="clear">                       
				</div>
				<ul class="pic_b">
					<!--{loop $relay_share['imgs'] $relay_share_img}-->
					<!--{if $relay_share_img['type'] == 'g'}-->
					<li class="pic_b_f r5" style="display: none;"> 
						<div class="pic_b_hd">
							<a class="mg_slink ofh" ref="nofollow" target="_blank" href="{$relay_share_img['to_url']}"{$relay_share_img['tdj']}>{$relay_share_img['name']}</a>
							<a class="buy_it mg_slink" target="_blank" href="{$relay_share_img['to_url']}"{$relay_share_img['tdj']}><span class="g_p"><span>{$relay_share_img['price_format']}</span></span><i></i></a>	
						</div>                
						<div class="pic_b_bd">
							<img class="lazyload" alt="{$relay_share_img['alt']}" original="{getimg $relay_share_img['img'] 468 468}" src="./tpl/images/lazyload.gif" scaleType="1" scaleWidth="468" scaleHeight="468">
						</div>
					</li>
					<!--{else}-->
					<li class="pic_b_f r5" style="display: none;">
						<div class="pic_b_bd">
							<img class="lazyload" alt="{$relay_share_img['alt']}" original="{getimg $relay_share_img['img'] 468 468}" src="./tpl/images/lazyload.gif" scaleType="1" scaleWidth="468" scaleHeight="468">
						</div>	
					</li>
					<!--{/if}-->
					<!--{/loop}-->
				</ul>
				<!--{/if}-->
				<div class="clear"></div>
			</div>
			<!--{/if}-->
			<div class="tl">
				<!--{if $share_item['share_data'] != 'default'}-->
				<a w="f" href="javascript:;" class="add_fav fav" onclick="$.Fav_Share({$share_item['share_id']},this,32,'#SHARE_LIST_{$share_item['share_id']}');"></a>
				<div class="favDiv">
					<a name="myfav_{$share_item['share_id']}" href="{$share_item['url']}" target="_blank" class="SHARE_FAV_COUNT favCount">{$share_item['collect_count']}</a><i></i>
				</div>
				<!--{/if}-->
				<!--{if $self_share['authoritys'] > 0}-->
				<a w="f" href="javascript:;" class="mg SHARE_MANAGE">管理</a>
				<!--{/if}-->
				<a w="f" href="javascript:;" class="fw ed" onclick="$.Relay_Share($share_item['share_id']);">转发({$share_item['relay_count']})</a>
				<a name="comment_count_{$share_item['share_id']}" w="f" href="javascript:;" class="cmt ed" shareID="{$share_item['share_id']}" onclick="$.Get_Share_Comment_List(this);">评论({$share_item['comment_count']})</a>
				<a w="f" href="javascript:;" class="fw ed" onclick="jubao($share_item['share_id']);">举报</a>
			</div>
			<ul class="SHARE_FAV_LIST u_like">
				<!--{loop $share_item['collects'] $collect_uid}-->
				<li><!--{getuser $collect_uid 0 'm' ',icard r3'}--></li>
				<!--{/loop}-->
			</ul>
			<ul class="t_m_l_h SHARE_MANAGE_LIST">
				<!--{if $self_share['authoritys'] > 0}-->
				<li><a class="del" onclick="$.Tweet_Delete($self_share['share_id'])" href="javascript:void(0);">删除</a></li>
				<!--{if $self_share['authoritys'] > 1}-->
				<li><a class="del" onclick="$.Tweet_Delete($self_share['share_id'],1)" href="javascript:void(0);">剔除</a></li>
				<!--{/if}-->
				<!--{/if}-->
			</ul>
		</div>
	</li>
	<!--{if count($share_item['imgs']) >= 6}-->
    <script type="text/javascript">
    $(document).ready(function(){
        scrollPic_{$share_item['share_id']} = new ScrollPic();
        scrollPic_{$share_item['share_id']}.scrollContId   = "picscroll_{$share_item['share_id']}"; //图片容器ID
        scrollPic_{$share_item['share_id']}.arrLeftId      = "left_{$share_item['share_id']}"; //左按钮ID
        scrollPic_{$share_item['share_id']}.arrRightId     = "right_{$share_item['share_id']}"; //右按钮ID
        scrollPic_{$share_item['share_id']}.frameWidth     = 520; //图片容器宽度
        scrollPic_{$share_item['share_id']}.pageWidth      = 65; //每张图片宽度
        scrollPic_{$share_item['share_id']}.speed          = 10; //移动速度(单位毫秒，越小越快)
        scrollPic_{$share_item['share_id']}.space          = 10; //每次移动像素(单位px，越大越快)
        scrollPic_{$share_item['share_id']}.autoPlay       = false; //自动播放
        scrollPic_{$share_item['share_id']}.autoPlayTime   = 3; //自动播放间隔时间(秒)
        scrollPic_{$share_item['share_id']}.initialize();  //初始化
    });
    </script>
    <!--{/if}-->
	<!--{/loop}-->
</ul>
<div class="pagination mt20"> 				
	<!--{subtemplate inc/pages}--> 
</div>
<script type="text/javascript" src="/public/js/ScrollPic.js"></script>
<script type="text/javascript">
function ShareListUpdateUserFollow(obj,result)
{
	if(result.status == 1)
	{
		$(obj).before('<img src="./tpl/images/add_fo_ok.png" class="fo_ok">');
		$(obj).remove();
	}
}

function jubao(id) {
    if(window.confirm('确定举报吗？')) {
        $.get('/u.php?action=jb&id='+id, function(s){
            alert(s);
        });
    }
}
</script>
<!--{/if}-->